// MembersServiceImpl.java
package com.sms.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.sms.mapper.MembersMapper;
import com.sms.pojo.Members;
import com.sms.service.MembersService;
import com.sms.util.SqlSessionFactoryUtil;
import lombok.Getter;
import org.apache.ibatis.session.SqlSession;
import org.apache.ibatis.session.SqlSessionFactory;
import org.springframework.stereotype.Service;

@Getter
@Service
public class MembersServiceImpl extends ServiceImpl<MembersMapper,Members> implements MembersService {

    SqlSession sqlSession=null;

    @Override
    public MembersMapper getBaseMapper() {
        SqlSessionFactory factory = SqlSessionFactoryUtil.getFactory();
        sqlSession=factory.openSession(true);
        MembersMapper mapper = factory.getConfiguration().getMapper(MembersMapper.class, sqlSession);
        return mapper;
    }

}
